package demo

object HelpOther {
  def main(args: Array[String]): Unit = {

    val word = "abcdefg"
    //1.
    val str = word.filter(x => x != 'g')
    println(str)
    //2.
    word.filter(x => x != 'g').foreach(print)
  }

}
